Skip to content

feat(everything): add tool annotations to all 18 tools#3543

Open
nielskaspers wants to merge 1 commit intomodelcontextprotocol:mainfrom
nielskaspers:fix/issue-3401-add-tool-annotations
Open

feat(everything): add tool annotations to all 18 tools#3543
nielskaspers wants to merge 1 commit intomodelcontextprotocol:mainfrom
nielskaspers:fix/issue-3401-add-tool-annotations

Conversation

@nielskaspers
Copy link
Contributor

Summary

  • Adds MCP tool annotations to all 18 tools in server-everything, the reference server developers use to learn the protocol
  • Brings server-everything in line with server-filesystem, which already annotates all 14 of its tools

Issue

Fixes #3401

Changes

  • Read-only tools (echo, get-env, get-sum, get-annotated-message, get-resource-links, get-resource-reference, get-structured-content, get-tiny-image, get-roots-list, trigger-long-running-operation, simulate-research-query): readOnlyHint: true
  • Toggle tools (toggle-simulated-logging, toggle-subscriber-updates): readOnlyHint: false, destructiveHint: false, idempotentHint: false
  • gzip-file-as-resource: readOnlyHint: false, idempotentHint: true, openWorldHint: true (fetches external URLs, creates session resources)
  • Sampling/elicitation tools (trigger-sampling-request, trigger-elicitation-request, and their async variants): readOnlyHint: false, destructiveHint: false

Testing

  • npm test --workspace=src/everything — all 95 tests pass
  • npm run build --workspace=src/everything — builds cleanly

The server-everything reference server is the primary example developers
use to learn MCP. Adding tool annotations brings it in line with
server-filesystem, which already annotates all its tools.

Annotations per tool:
- Read-only tools (echo, get-env, get-sum, etc.): readOnlyHint: true
- Toggle tools: readOnlyHint: false, destructiveHint: false, idempotentHint: false
- gzip-file-as-resource: readOnlyHint: false, idempotentHint: true, openWorldHint: true
- Sampling/elicitation tools: readOnlyHint: false, destructiveHint: false

Fixes modelcontextprotocol#3401
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tool annotations to server-everything (13 tools, 0 annotated)

1 participant